
# Create your models here.
from django.db import models
from django.contrib import admin

# Create your models here.
class WeiboMessage(models.Model):
    msg_url = models.CharField(max_length=256)
    author_main_page = models.CharField(max_length=256)
    msg_content = models.CharField(max_length=64)
    msg_time = models.TextField()
    msg_author = models.TextField()
    msg_review_cnt = models.TextField()

    # def __str__(self):
    #     return self.msg_content
        # return str(list(self.msg_content,
        #     self.msg_author,
        #     self.msg_review_cnt,
        #     self.msg_url,
        #     self.msg_time,
        #     self.author_main_page)) #这里是查到数据库要返回的内容?




class WeiboMessageAdmin(admin.ModelAdmin):
    list_display = ('msg_author','author_main_page','msg_content','msg_time','msg_url','msg_review_cnt')

#admin.site.register(WeiboMessage,WeiboMessageAdmin)  因为在admin里面注册了